<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>全选</title>
    <script src="/static/jQuery-1.11/jquery-1.11.3.min.js"></script>
</head>
<body>
请选择你的爱好:<br/>
<input type="checkbox" onchange="checkChange(this)" id="checkAll"/>全选/全不选
<br/>
<div>
    <input type="checkbox" name="hobby"/>JAVA&nbsp;
    <input type="checkbox" name="hobby"/>打篮球&nbsp;
    <input type="checkbox" name="hobby"/>上网&nbsp;
    <input type="checkbox" name="hobby"/>撩妹&nbsp;
</div>
<div>
    <input type="button" id="btn_checkAll" onclick="checkAll(true)"
           value="全选"/>
    <input type="button" onclick="checkAll(false)" value="全不选"/>
    <input type="button" onclick="checkUnAll()" value="反选"/>
</div>
</body>
</html>